<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SdFat: FsDateTime Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SdFat
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">FsDateTime Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af88a1ebd9c91a474c79a641e716729a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_fs_date_time.html#af88a1ebd9c91a474c79a641e716729a0">clearCallback</a> ()</td></tr>
<tr class="separator:af88a1ebd9c91a474c79a641e716729a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afae6e23c2ed7d8194023d19d87fb1b62"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_fs_date_time.html#afae6e23c2ed7d8194023d19d87fb1b62">setCallback</a> (void(*dateTime)(uint16_t *date, uint16_t *time))</td></tr>
<tr class="separator:afae6e23c2ed7d8194023d19d87fb1b62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa48bd625d32aae8fcfe67aba1d080be3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_fs_date_time.html#aa48bd625d32aae8fcfe67aba1d080be3">setCallback</a> (void(*dateTime)(uint16_t *date, uint16_t *time, uint8_t *ms10))</td></tr>
<tr class="separator:aa48bd625d32aae8fcfe67aba1d080be3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ab4e1acabf30bc682af20e1cc93330a6a"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_fs_date_time.html#ab4e1acabf30bc682af20e1cc93330a6a">callback</a> )(uint16_t *date, uint16_t *time, uint8_t *ms10) = <a class="el" href="_stdio_stream_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></td></tr>
<tr class="separator:ab4e1acabf30bc682af20e1cc93330a6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c19b53a8b6c93d38a4bb2f2981a4efa"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_fs_date_time.html#a1c19b53a8b6c93d38a4bb2f2981a4efa">callback2</a> )(uint16_t *date, uint16_t *time) = <a class="el" href="_stdio_stream_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></td></tr>
<tr class="separator:a1c19b53a8b6c93d38a4bb2f2981a4efa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Date time callback.</p>
<p>Date time callback </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="af88a1ebd9c91a474c79a641e716729a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af88a1ebd9c91a474c79a641e716729a0">&#9670;&nbsp;</a></span>clearCallback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FsDateTime::clearCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cancel callback. </p>

</div>
</div>
<a id="afae6e23c2ed7d8194023d19d87fb1b62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afae6e23c2ed7d8194023d19d87fb1b62">&#9670;&nbsp;</a></span>setCallback() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FsDateTime::setCallback </td>
          <td>(</td>
          <td class="paramtype">void(*)(uint16_t *date, uint16_t *time)&#160;</td>
          <td class="paramname"><em>dateTime</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the date/time callback function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dateTime</td><td>The user's call back function. The callback. function is of the form:</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> dateTime(uint16_t* date, uint16_t* time) {</div>
<div class="line">  uint16_t year;</div>
<div class="line">  uint8_t month, day, hour, minute, second;</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// User gets date and time from GPS or real-time clock here.</span></div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Return date using FS_DATE macro to format fields.</span></div>
<div class="line">  *date = FS_DATE(year, month, day);</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Return time using FS_TIME macro to format fields.</span></div>
<div class="line">  *time = FS_TIME(hour, minute, second);</div>
<div class="line">}</div>
</div><!-- fragment --><p>Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time. </p>

</div>
</div>
<a id="aa48bd625d32aae8fcfe67aba1d080be3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa48bd625d32aae8fcfe67aba1d080be3">&#9670;&nbsp;</a></span>setCallback() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FsDateTime::setCallback </td>
          <td>(</td>
          <td class="paramtype">void(*)(uint16_t *date, uint16_t *time, uint8_t *ms10)&#160;</td>
          <td class="paramname"><em>dateTime</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the date/time callback function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dateTime</td><td>The user's call back function. The callback function is of the form:</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> dateTime(uint16_t* date, uint16_t* time, uint8_t* ms10) {</div>
<div class="line">  uint16_t year;</div>
<div class="line">  uint8_t month, day, hour, minute, second;</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// User gets date and time from GPS or real-time clock here.</span></div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Return date using FS_DATE macro to format fields</span></div>
<div class="line">  *date = FS_DATE(year, month, day);</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Return time using FS_TIME macro to format fields</span></div>
<div class="line">  *time = FS_TIME(hour, minute, second);</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Return tenths of milliseconds since last even second.</span></div>
<div class="line">  <span class="comment">// The granularity of the seconds part of FS_TIME is 2 seconds so</span></div>
<div class="line">  <span class="comment">// this field is a count of tenths of a second and its valid value</span></div>
<div class="line">  <span class="comment">// range is 0-199 inclusive.</span></div>
<div class="line">  <span class="comment">// For a simple RTC return 100*(seconds &amp; 1).</span></div>
<div class="line">  *ms10 = &lt;tens of ms since even second&gt;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time. </p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ab4e1acabf30bc682af20e1cc93330a6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4e1acabf30bc682af20e1cc93330a6a">&#9670;&nbsp;</a></span>callback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* FsDateTime::callback = <a class="el" href="_stdio_stream_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Date time callback. </p>

</div>
</div>
<a id="a1c19b53a8b6c93d38a4bb2f2981a4efa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c19b53a8b6c93d38a4bb2f2981a4efa">&#9670;&nbsp;</a></span>callback2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* FsDateTime::callback2 = <a class="el" href="_stdio_stream_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Date time callback. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Dec 5 2020 05:21:25 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
